<link type="text/css" href="https://cdn.bootcdn.net/ajax/libs/amazeui/2.7.2/css/amazeui.min.css" rel="stylesheet">
<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/amazeui/2.7.2/js/amazeui.min.js"></script>



<!-- 文档地址 http://amazeui.shopxo.net/javascript/modal/ -->
<button
type="button"
class="am-btn am-btn-warning"
id="doc-confirm-toggle">
询问窗
</button>
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm" style="font-size: 14px">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">Amaze UI</div>
		<div class="am-modal-bd">
			你，确定要删除这条记录吗？
		</div>
		<div class="am-modal-footer">
			<span class="am-modal-btn" data-am-modal-cancel>取消</span>
			<span class="am-modal-btn" data-am-modal-confirm>确定</span>
		</div>
	</div>
</div>

<script type="text/javascript">
	$(function() {
		$('#doc-confirm-toggle').
		on('click', function() {
			$('#my-confirm').modal({
				relatedTarget: this,
				onConfirm: function(options) {
		          //dosomething
		          alert('你删除了');
		          console.log('yes');
		      },
		        // closeOnConfirm: false,
		        onCancel: function() {
		          //dosomething
		          alert('算求，不弄了');
		          console.log('no');
		      }
		  });
		});
	    //为了演示，先触发一次click事件
	    $('#doc-confirm-toggle').click();
	});
</script>
